<template>
  <div class="breadcrumd">
    <el-breadcrumb separator-class="/">
      <el-breadcrumb-item v-for="(item, index) in routerList" :key="index">
          <router-link :to="item.path">
        {{ item.meta.title }}
          </router-link>
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>
<script>
export default {
  data() {
    return {
      routerList: [],
    };
  },
  methods: {},
  // created(){
  //     this.routerList=this.$route.matched;
  //             console.log(this.routerList);

  // },
  watch: {
    $route(to, from) {
      this.routerList = to.matched;
    },
  },
};
</script>
<style scoped>
.breadcrumd {
  padding: 22px;
}
</style>